'use strict';
var log = new Log('log');
function Person() {
	var _name = null;
	var _age = 0;
	
	var name_descriptor = {
		get: function() {
			return _name;
		},
		set: function(value) {
			_name = value;
		},
		enumerable: true,
		configurable: true,
	};
	Object.defineProperty(this, "name", name_descriptor);
	
	var age_descriptor = {
		get: function() {
			return _age;
		},
		set: function(value) {
			_age = value;
		},
		enumerable: true,
		configurable: true,
	};
	Object.defineProperty(this, "age", age_descriptor);
}
var o = new Person();
log.i('name: ' + o.name);
o.name = 'Smith';
log.d('name: ' + o.name);
var names = Object.getOwnPropertyNames(o);
for(var i in names) log.i('enumerate proto: ' + names[i]);

log.e('has proto name: ' + o.hasOwnProperty('name'));
log.w('has proto age: ' + o.hasOwnProperty('age'));
var domain = new String(document.location);
log.e('domain: ' + domain.replace('index.html', 'paging.html'));

for (var att in console) log.e(att);